package com.hkj.configcenter.core.model;

import com.hkj.configcenter.core.Context;
import lombok.Data;

import java.io.Serializable;

@Data
public class ProjectConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    private String root;

    private String env;

    private String name;

    private String resourceConfig;

    private String fieldConfig;

    private String commonConfig;

    private String zkUrl;

    public String getResourceConfigPath() {
        return root + env + name + resourceConfig;
    }

    public String getFieldConfigPath() {
        return root + env + name + fieldConfig;
    }

    public String getCommonConfigPath() {
        return root + env + commonConfig;
    }

    public String getOnlineMachinesPath() {
        return root + env + name + Context.ONLINE_MACHINES;
    }

}
